// 对外暴露配置常量路由
export const constantRoute = [
  {
    path: '/login',
    component: () => import('@/views/login/login.vue'),
    name: 'login', // 命名路由
    meta: {
      title: '登录',
      hidden: true, // 路由的标题在菜单中是否隐藏
      icon: 'Promotion', // 菜单文字左侧的图标，支持elemntplus所有图标
    }, // 用来存储一些描述该路由的附加信息，比如页面标题、权限要求、面包屑等
  },
  {
    path: '/register',
    component: () => import('@/views/login/register.vue'),
    name: 'register', // 命名路由
    meta: {
      title: '注册',
      hidden: true, // 路由的标题在菜单中是否隐藏
      icon: 'Promotion', // 菜单文字左侧的图标，支持elemntplus所有图标
    }, // 用来存储一些描述该路由的附加信息，比如页面标题、权限要求、面包屑等
  },
  {
    path: '/forget',
    component: () => import('@/views/login/forget.vue'),
    name: 'forget', // 命名路由
    meta: {
      title: '忘记密码',
      hidden: true, // 路由的标题在菜单中是否隐藏
      icon: 'Promotion', // 菜单文字左侧的图标，支持elemntplus所有图标
    }, // 用来存储一些描述该路由的附加信息，比如页面标题、权限要求、面包屑等
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout', // 命名路由
    meta: {
      title: '',
      hidden: false,
      icon: '',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'House',
        },
      },
    ],
  },
  {
    path: '/user',
    component: () => import('@/layout/index.vue'),
    name: 'user',
    // 元数据，在layout/menu下的递归动态路由中展示，展示出菜单
    meta: {
      title: '用户信息管理模块', // 标题
      hidden: false, // 当前路由是否隐藏
      icon: 'User', // 图标
    },
    redirect: '/user/list',
    children: [
      {
        path: '/user/list',
        component: () => import('@/views/user/list/index.vue'),
        name: 'userlist',
        meta: {
          title: '用户列表',
          hidden: false,
          icon: 'Grid',
        },
      },
      {
        path: '/user/nickname',
        component: () => import('@/views/user/edit/nickname.vue'),
        name: 'nickname',
        meta: {
          title: '修改用户昵称',
          hidden: false,
          icon: 'Edit',
        },
      },
      {
        path: '/user/email',
        component: () => import('@/views/user/edit/email.vue'),
        name: 'email',
        meta: {
          title: '修改用户账号',
          hidden: false,
          icon: 'Edit',
        },
      },
      {
        path: '/user/avatar',
        component: () => import('@/views/user/edit/avatar.vue'),
        name: 'avatar',
        meta: {
          title: '修改用户头像',
          hidden: false,
          icon: 'Avatar',
        },
      },
      {
        path: '/user/password',
        component: () => import('@/views/user/edit/password.vue'),
        name: 'password',
        meta: {
          title: '修改用户密码',
          hidden: false,
          icon: 'Lock',
        },
      },
    ],
  },
  {
    path: '/predict',
    component: () => import('@/layout/index.vue'),
    name: 'predict',
    // 元数据，在layout/menu下的递归动态路由中展示，展示出菜单
    meta: {
      title: '房源信息模块', // 标题
      hidden: false, // 当前路由是否隐藏
      icon: 'Management', // 图标
    },
    redirect: '/predict/home',
    children: [
      {
        path: '/predict/home',
        component: () => import('@/views/predict/predict.vue'),
        name: 'predict',
        meta: {
          title: '价格预测',
          hidden: false,
          icon: 'Promotion',
        },
      },
      {
        path: '/predict/show',
        component: () => import('@/views/predict/show.vue'),
        name: 'show',
        meta: {
          title: '房源列表',
          hidden: false,
          icon: 'Grid',
        },
      },
    ],
  },
  {
    path: '/visual',
    component: () => import('@/layout/index.vue'),
    name: 'visual',
    // 元数据，在layout/menu下的递归动态路由中展示，展示出菜单
    meta: {
      title: '可视化分析模块', // 标题
      hidden: false, // 当前路由是否隐藏
      icon: 'Management', // 图标
    },
    redirect: '/visual/index',
    children: [
      {
        path: '/visual/index',
        component: () => import('@/views/screen/screen.vue'),
        name: 'screen',
        meta: {
          title: '大屏分析',
          hidden: false,
          icon: 'FullScreen',
        },
      },
      {
        path: '/visual/trend',
        component: () => import('@/views/screen/trend.vue'),
        name: 'trend',
        meta: {
          title: '房源价格趋势分析',
          hidden: false,
          icon: 'TrendCharts',
        },
      },
    ],
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404', // 命名路由
    meta: {
      title: '404',
      hidden: true,
      icon: 'DocumentDelete',
    },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any', // 命名路由
    meta: {
      title: '任意',
      hidden: true,
      icon: 'DataLine',
    },
  },
]
